<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>404</title>
  <script src="js/qwebchannel.js"></script>
</head>
<style>
  *{
    margin: 0;
    padding: 0;
  }
  .error {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;
    background-color: #fff;
  }
  .error-bg{
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top:0;
    z-index: -1;
    background-image: linear-gradient(to bottom, #5e85c8 0%, #623db6 100%);
    opacity: .1;
  }
  img{
    display: block;
    margin: 0 auto;
  }
  button{
    display: block;
    width: 85px;
    margin: 20px auto;
    color: #fff;
    background-color: #5e85c8;
    border-color: #5e85c8;
    line-height: 28px;
    outline: none;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
  }
  button:hover{
    background-color: #7e9dd3;
    border-color: #7e9dd3;
  }
  button:active{
    background-color: #597ebe;
    border-color: #597ebe;
  }
</style>
<body>
<div class="error">
  <img src="images/errorBg.png" alt="error">
  <button id="refresh">刷新</button>
  <div class="error-bg"></div>
</div>
</body>
<script>

 window.onload = () => {

   if (typeof(QCefClient) == 'undefined') {
     return;
   } else {
     QCefClient.invokeMethod("callClientFun",command);
     QCefClient.addEventListener("refreshCallback", refreshCallback);
   }

   let link = '';
   function refreshCallback(args) {
     let response = args["args"];
     let res = JSON.parse(response);
     link = res.link;
   }

   let refresh = document.getElementById('refresh');
   refresh.onclick = () => {
     window.location.href = link;
   }

 }

</script>
</html>
